1. Field of the Invention
The present invention relates to an image processing method and an image processing apparatus for carrying out color balance adjustment processing on an image obtained by using a digital camera when the image is output from a printer or the like, and also relates to a computer-readable recording medium storing a program to cause a computer to execute the image processing method.
2. Description of the Related Art
In a digital electronic still camera (hereinafter called a digital camera), an image obtained by photographing is recorded as digital image data in a recording medium such as an IC card or a built-in memory installed in the digital camera. Based on the digital image data having been recorded, the photographed image can be reproduced as a hard copy such as a print or a soft copy on a display device. When an image obtained by a digital camera is reproduced as has been described above, the image is expected to have as high a quality as a photograph printed from a negative film.
Meanwhile, human vision has a mechanism called chromatic adaptation for perceiving white paper as white not as bluish or reddish even in daylight or in light from a fluorescent lamp or a tungsten light each having a different spectrum energy distribution from normal daylight. Taking such chromatic adaptation into consideration, a digital camera having a function (an AWB function) has been proposed for carrying out automatic white balance adjustment processing (AWB processing) in accordance with a light source used at the time of photographing on original image data representing a photographed image so as to obtain an image not depending on a color of the light source such as tungsten light, light from a fluorescent lamp, or daylight.
Furthermore, a digital camera for outputting image data after image processing such as chroma enhancing processing on the image data so as to cause a color to become adequate when displayed on a CRT monitor has been known, since image data obtained by a digital camera are frequently displayed on a CRT monitor.
Meanwhile, when image data obtained by a digital camera are output as a hard copy from a printer or the like, the printer carries out AWB processing adequate for printing on the image data and the image data after the processing are printed.
Due to limitation caused by processing speed or hardware, the AWB processing carried out in a digital camera is comparatively simple processing for adjusting a gain of each color by equalizing averages of RGB colors, assuming an average of all pixel values being gray. Meanwhile, a printer can carry out more sophisticated AWB processing than that of a digital camera. For example, as has been described in Japanese Patent Application No. 11(1999)-70186, RGB values of each pixel are converted into chromaticity values to find averages of the chromaticity values. The averages are then converted into physiological primary colors and assumed to be a neutral point of a light source used at the time of photographing. The chromaticity values are converted so as to cause the physiological primary colors to be equal to physiological primary colors of a reference light source for photographing. The converted chromaticity values are then converted into RGB signals.
However, since image data output from a digital camera have been subjected to AWB processing, colors look different from colors in an original image. Therefore, for image data obtained by a digital camera, the function of sophisticated AWB processing carried out by a printer is not fully used. In the case where the digital camera carries out image processing such as chroma enhancing processing as well as the AWB processing, image data obtained by the digital camera have distorted color balance. As a result, regardless of sophisticated AWB processing carried out on the image data, an adequate neutral point cannot be set and a high quality image cannot be obtained.
The present invention has been conceived based on consideration of the above problems. An object of the present invention is therefore to provide an image processing method and an image processing apparatus for carrying out adequate color balance adjustment processing such as AWB processing on image data obtained by a digital camera, and also to provide a computer-readable recording medium storing a program to cause a computer to execute the image processing method.